package com.ruiyi.subway.utils;

import org.apache.shiro.crypto.hash.SimpleHash;
import org.apache.shiro.util.ByteSource;

public class MD5Util {
	
	public static Object MD5(String username,String passworld){
		String hashAlgorithmName = "MD5";
		//String credentials = "123456";/*密码*/
		//ByteSource salt = ByteSource.Util.bytes("wangwu");/*颜值*/
		String credentials = passworld;/*密码*/
		ByteSource salt = ByteSource.Util.bytes(username);/*颜值*/
		int hashIterations = 1024;
		Object result = new SimpleHash(hashAlgorithmName, credentials, salt,hashIterations);/*加密计算方式*/
		return result;
	}
	
}
